<?php $this->pageTitle = Yii::app()->user->name; ?>
<script type="text/javascript">
	$(document).ready(function() {
		JScrollHeightOnce();
		jQuery(function(){	
			$('.scroll-pane').jScrollPane({
				contentWidth: '0px',
				verticalGutter: 0
			});
		});
	});
	$(window).load(function() {
		JScrollHeightOnce();
		jQuery(function(){	
			$('.scroll-pane').jScrollPane({
				contentWidth: '0px',
				verticalGutter: 0
			});
		});
	});
	$(window).resize(function() {
		JScrollHeightOnce();
		jQuery(function(){	
			$('.scroll-pane').jScrollPane({
				contentWidth: '0px',
				verticalGutter: 0
			});
		});
	});
</script>
<div class="c_body">
	<div class="u_tabs">
		<div class="u_tabs_head">
			<div class="u_tab curr" id="u_search_tab1">Диалоги</div>
		</div>
		<div class="search_block cat_search_block">
			<form action="" id="friend_search_form">
				<div class="search_fld">
					<div class="search_icon"></div>
					<input type="text" value="Начните вводить имя друга" class="search_friend" rel="<?php echo Yii::app()->createUrl('profile/autocompletefriends'); ?>" />
					<input type="hidden" id="redirect_getdialog" value="<?php echo Yii::app()->createUrl("messages/getdialog", array('profile'=>Yii::app()->request->getParam('profile'))); ?>" />
				</div>
			</form>
		</div>
	</div>
	
	<div class="tab" id="u_search_tab1_">
		<div class="cat_head">
			<div class="cat_head_strip"></div>
			<a href="<?php echo Yii::app()->createUrl("messages/createmessage", array('profile'=>Yii::app()->request->getParam('profile'))); ?>" class="green_btn r_m"><i>+</i>Написать сообщение</a>
			<div class="cat_head_h t"><p class="cat_head_h_txt"><span><?php echo count($dialogs); ?></span> диалога</p></div>
		</div>		
		<div class="cat_list_block scroll-pane">
			<div class="scroll_block">
				<?php $this->renderPartial('_dialogsList',array(
					'dialogs'=>$dialogs
				)); ?>	
			</div>
		</div>
		<div class="clear"></div>		
	</div>
</div>